package com.aaa.controller;

import com.aaa.entity.Financeincome;
import com.aaa.entity.Financexpend;
import com.aaa.service.impl.FinanceincomeServiceImpl;
import com.aaa.service.impl.FinancexpendServiceImpl;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import java.util.List;

@CrossOrigin
@Controller
@RequestMapping("fi")
public class FinanceincomeController {
    @Resource
    FinanceincomeServiceImpl financeincomeService;
    @RequestMapping("list")
    @ResponseBody
    public List<Financeincome> list(){
        return financeincomeService.list();
    }
    @RequestMapping("save")
    @ResponseBody
    public Boolean save(Financeincome financeincome){
        return financeincomeService.save(financeincome);
    }
    @RequestMapping("remove")
    @ResponseBody
    public Boolean remove(Integer ifid){
        return financeincomeService.removeById(ifid);
    }
    @RequestMapping("update")
    @ResponseBody
    public Boolean update(Financeincome financeincome){
        return financeincomeService.updateById(financeincome);
    }
}
